package com.sherllinhe.business.controller;

import com.sherllinhe.business.req.StationQueryReq;
import com.sherllinhe.business.req.StationSaveReq;
import com.sherllinhe.business.resp.StationQueryResp;
import com.sherllinhe.business.service.StationService;
import com.sherllinhe.common.resp.CommonResp;
import com.sherllinhe.common.resp.PageResp;
import jakarta.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 功能：
 * 作者：Sherllin He
 * 日期：2025/4/25 21:10
 */
@RequestMapping("/station")
@RestController
public class StationController {
    @Autowired
    private StationService stationService;

    @GetMapping("/query-all")
    public CommonResp<List<StationQueryResp>> register(){
        List<StationQueryResp> list = stationService.queryAll();
        return new CommonResp<>(list);
    }
}
